home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8175 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: ix.netcom.com!netnews
  2. From: judgemi@ix.netcom.com (Michael Judge)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: visual c++: #undef
  5. Date: 15 Feb 1996 13:57:14 GMT
  6. Organization: TSI
  7. Message-ID: <4fve3q$eva@cloner2.ix.netcom.com>
  8. References: <DMsrJE.7GI@info.uucp>
  9. NNTP-Posting-Host: ix-bst-ma2-11.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-NETCOM-Date: Thu Feb 15  5:57:14 AM PST 1996
  13. X-Newsreader: WinVN 0.99.7
  14.  
  15. In article <DMsrJE.7GI@info.uucp>, body2872@mach1.wlu.ca says...
  16. >
  17. >
  18. >my #undefs cause Visual C++ (2.2) to give warnings, yet it fine in 
  19. >Borland C++
  20. >
  21. >
  22. >i use it inside the function with first 
  23. >#define LA
  24. >..code
  25. >#undef LA
  26. >
  27. >or with #define and #undef between functions, and i always the warning 
  28. >that 
  29. >"unexpected characters following #undef; newline expected"
  30. >but there are no unexpected characters there, just
  31. >eg. #undef   ROWCOL(i)
  32.  
  33. the problem here is that you are undefining a MACRO. just say
  34.  
  35. #define ROWCOL(i) ((i)*(i))
  36. .
  37. .
  38. .
  39. #undef ROWCOL
  40.  
  41. I dont think the #undef ROWCOL(i) is necessary
  42.  
  43. MJ
  44.  
  45.